<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>destructuring</title>
</head>
<body>
<script>
    // 对象的解构赋值默认值
    /*let {a=3}={}
    console.log(a);*/

    /*let {a=3,b}={b:5};
    console.log(a); /!*3*!/
    console.log(b); /!*5*!/*/
    // 起别名
    var {a:newa='new name'}={};
    console.log(newa)
</script>
</body>
</html>